import { ApiProperty } from '@nestjs/swagger';
import { Base } from 'src/entities/Base';
import { Column, Entity } from 'typeorm';

@Entity('sys_image')
export class ImageSource extends Base {
    @ApiProperty()
    @Column({ name: 'type', type: 'int', comment: '图片所属类型', default: 0 })
    type: number;

    typeDesc: string;

    @ApiProperty()
    @Column({ name: 'guid', comment: '唯一ID', default: '' })
    guid: string;

    @ApiProperty()
    @Column({ name: 'creator_guid', comment: '创建人ID', default: '' })
    creatorGuid: string;

    @ApiProperty()
    @Column({ name: 'ref_guid', comment: '关联GUID', default: '' })
    refGuid: string;

    @ApiProperty()
    @Column({ name: 'name', comment: '图片名称', default: '' })
    name: string;

    @ApiProperty()
    @Column({ name: 'url', comment: '图片路径', default: '' })
    url: string;

    @ApiProperty()
    @Column({ name: 'hash', comment: 'hash值', default: '' })
    hash: string;
}
